
package com.root.dreameraadmin.activity;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;

import com.root.dreameraadmin.R;
import com.root.dreameraadmin.utils.AsyncGetDataUtil;

import java.util.Timer;
import java.util.TimerTask;


public class WelcomePageActivity extends Activity {

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_welcome_page);

            AsyncGetDataUtil.getJSONData();
            TimerTask task = new TimerTask(){
                @Override
                public void run(){
                    Intent intent = new Intent();
                    intent.setClass(WelcomePageActivity.this, ListActivity.class);
//                    intent.setClass(WelcomePageActivity.this, TestActivity.class);
                    WelcomePageActivity.this.startActivity(intent);
                    finish();
                }
            };
            Timer timer = new Timer();//计时1s
            timer.schedule(task, 2000);
    }


    @Override
    protected void onPostCreate(Bundle savedInstanceState) {
        super.onPostCreate(savedInstanceState);
    }
}
